#include "outer.h"

outer::outer()
{
    publisher = zmq::socket_t(context, zmq::socket_type::pub);
    publisher.bind("tcp://*:10011");
    connect(&timer, &QTimer::timeout, this, &outer::pubmessage);
    timer.start(1000);

}

void outer::pubmessage()
{

    std::this_thread::sleep_for(std::chrono::milliseconds(1000));
    publisher.send(zmq::str_buffer("A"), zmq::send_flags::sndmore);
    publisher.send(zmq::str_buffer("Message in A envelope"));
    std::cout << "pub...A" << std::endl;

}
